package com.liaowei.user.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.liaowei.model.domain.Article;
import com.liaowei.model.domain.UserArticleHistory;
import com.liaowei.model.param.ArticleHistoryParam;
import com.liaowei.user.model.param.PageArticleHistoryParam;

import java.util.List;

/**
* @author LindaMan
* @description 针对表【wy_user_article_history(用户浏览文章历史表)】的数据库操作Service
* @createDate 2023-05-01 17:19:40
*/
public interface UserArticleHistoryService extends IService<UserArticleHistory> {

    // 新增文章历史记录
    String addArticleHistory(ArticleHistoryParam postHistoryParam);

    // 根据用户id和文章id删除文章记录
    String removeArticleHistoryByUserIdAndArticleId(Long userId, Long articleId);

    // 分页查询自己的文章历史记录
    List<Article> searchArticleHistoryPage(PageArticleHistoryParam historyParam);

    // 根据userId删除全部的文章历史记录
    String removeAllArticleHistoryByUserId(long userId);
}
